
$(function () {
    var eid = GetQueryString("eid");
    var sel = $.Params.create();
    sel.ajax("get", getMeetIP() + "speakHost/" + eid, function (data) {
        var val = data;
        $("#pUrl").attr('src', getMeetUrlIP() + "data/headImg/" + val.headImg);
        $("#name").val(val.name);
        $("#tel").val(val.tel);
        $("#hospitalName").val(val.hospitalName); 
       // $("#type").val(val.type);
    })

    $("#pic").on("change", function (e) {
        var src, url = window.URL || window.webkitURL || window.mozURL, files = e.target.files;
        // for (var i = 0, len = files.length; i < len; ++i) {
        var file = files[0];
        if (url) {
            src = url.createObjectURL(file);
        } else {
            src = e.target.result[0];
        }
        $("#pUrl").attr('src', src);
        // }
    });
    //取消时
    $("#cancelAdd").on("click", function () {
        window.history.go(-1);
    })
    $("#addData").on("click", function () {
        $("#addForm").attr("action", getMeetIP() + "speakHost/"+eid);
        $("#addForm").submit();
    })
});

